package com.jimmieran.myshop.myshopdatasyncservice.controller;

import com.jimmieran.myshop.myshopdatasyncservice.service.EshopProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/myshop")
public class EshopProductController {

    @Autowired
    private EshopProductService eshopProductService;

    @RequestMapping("/findProductById")
    public String findProductById(@RequestParam("id") long id){
        return eshopProductService.findProductById(id);
    }

}
